package model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the subscribe database table.
 * 
 */
@Entity
@NamedQuery(name="Subscribe.findAll", query="SELECT s FROM Subscribe s")
public class Subscribe implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idSubscribe;

	//bi-directional one-to-one association to Candidate
	@OneToOne(mappedBy="subscribe")
	private Candidate candidate;

	//bi-directional many-to-one association to Party
	@ManyToOne
	@JoinColumn(name="idParty")
	private Party party;

	public Subscribe() {
	}

	public int getIdSubscribe() {
		return this.idSubscribe;
	}

	public void setIdSubscribe(int idSubscribe) {
		this.idSubscribe = idSubscribe;
	}

	public Candidate getCandidate() {
		return this.candidate;
	}

	public void setCandidate(Candidate candidate) {
		this.candidate = candidate;
	}

	public Party getParty() {
		return this.party;
	}

	public void setParty(Party party) {
		this.party = party;
	}

}